<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
</head>
<body>
    <form enctype="multipart/form-data" action="" method="post">
        {% csrf_token %}
        {{ form_obj.as_p }}
        <input type="submit" value="文件上传"/>
        <img src="/media/{{ user.headimg }}">
    </form>
</body>
</html>